﻿@model IEnumerable<DauGiaApp.TaiKhoan>

@{
    ViewBag.Title = "DanhSach";
}

<h2>DanhSach</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            TenTaiKhoan
        </th>
        <th>
            MatKhau
        </th>
        <th>
            MaLoaiTaiKhoan
        </th>
        <th>
            Avatar
        </th>
        <th>
            TrangThai
        </th>
        <th>
            DiemTinCayBan
        </th>
        <th>
            DiemTinCayMua
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
    
        <td>
            @Html.DisplayFor(modelItem => item.TenTaiKhoan)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MatKhau)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MaLoaiTaiKhoan)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Avatar)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TrangThai)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DiemTinCayBan)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DiemTinCayMua)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.MaTaiKhoan }) |
            @Html.ActionLink("Details", "Details", new { id=item.MaTaiKhoan }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.MaTaiKhoan })
        </td>
    </tr>
}

</table>
